import Mock from 'mockjs';

let List = [];
export default{
    getStatisticalData:()=>{
        for(let i=0;i<12;i++){
            List.push(
                Mock.mock({
                    vivo:Mock.Random.float(0,4,0,0),
                    apple:Mock.Random.float(2,6,0,0),
                    HUAHEI:Mock.Random.float(2,7,0,0),
                    oppo:Mock.Random.float(1,5,0,0),
                    honor:Mock.Random.float(0,6,0,0),
                    Redmi:Mock.Random.float(0,4,0,0),
                    mi:Mock.Random.float(1,6,0,0),
                    realme:Mock.Random.float(0,5,0,0),
                    iqoo:Mock.Random.float(0,4,0,0),
                    ONEPLUS:Mock.Random.float(0,4,0,0),
                    SAMSUNG:Mock.Random.float(1,6,0,0),
                    meizu:Mock.Random.float(0,5,0,0),
                })
            )
        }
        return{
            code:999,
            data:{
                //饼图
                videoData:[
                    {
                        name:'vivo',
                        value:8.26
                    },
                    {
                        name:'apple',
                        value:12.28
                    },
                    {
                        name:'HUAWEI',
                        value:13.60
                    },
                    {
                        name:'oppo',
                        value:9.14
                    },
                    {
                        name:'honor',
                        value:8.23
                    },
                    {
                        name:'Redmi',
                        value:6.56
                    },
                    {
                        name:'mi',
                        value:6.98
                    },
                    {
                        name:'realme',
                        value:5.69
                    },
                    {
                        name:'iqoo',
                        value:5.31
                    },
                    {
                        name:'ONEPLUS',
                        value:5.98
                    },
                    {
                        name:'SAMSUNG',
                        value:9.48
                    },
                    {
                        name:'meizu',
                        value:8.49
                    },
                ],
                //柱状图
                lastWeekOrderData:[
                    {
                        date:'Sun',
                        new:5,
                    },
                    {
                        date:'Mon',
                        new:10,
                    },
                    {
                        date:'Tue',
                        new:16,
                    },
                    {
                        date:'Wed',
                        new:34,
                    },
                    {
                        date:'Thu',
                        new:48,
                    },
                    {
                        date:'Fri',
                        new:30,
                    },
                    {
                        date:'Sat',
                        new:21,
                    },
                ],
                //折线图
                orderData:{
                    date:['2022-09-11','2022-09-12','2022-09-13','2022-09-14','2022-09-15','2022-09-16','2022-09-17',],
                    data:List
                },
                //表格数据
                tableData: [
                    {
                      name:'vivo',
                      totalSales:'1546',
                      monthlySales:'135',
                    },
                    {
                      name:'apple',
                      totalSales:'1568',
                      monthlySales:'168',
                    },
                    {
                      name:'HUAHEI',
                      totalSales:'1697',
                      monthlySales:'196',
                    },
                    {
                      name:'oppo',
                      totalSales:'1369',
                      monthlySales:'148',
                    },
                    {
                      name:'honor',
                      totalSales:'1684',
                      monthlySales:'135',
                    },
                    {
                      name:'Redmi',
                      totalSales:'1598',
                      monthlySales:'136',
                    },
                    {
                      name:'mi',
                      totalSales:'1697',
                      monthlySales:'167',
                    },
                    {
                      name:'realme',
                      totalSales:'1294',
                      monthlySales:'124',
                    },
                    {
                      name:'iqoo',
                      totalSales:'1264',
                      monthlySales:'118',
                    },
                    {
                      name:'ONEPLUS',
                      totalSales:'1645',
                      monthlySales:'181',
                    },
                    {
                      name:'SAMSUNG',
                      totalSales:'1359',
                      monthlySales:'185',
                    },
                    {
                      name:'meizu',
                      totalSales:'1329',
                      monthlySales:'164',
                    },
                ],
                //顶部六个卡片数据
                otherData:[
                    { 
                        icon:'el-icon-success',
                        bgaColor:'backgroundColor:rgb(34,184,205)',
                        data:'315',
                        text:'今日已完成订单'
                    },
                    {
                        icon:'el-icon-s-goods',
                        bgaColor:'backgroundColor:rgb(34,184,205)',
                        data:'8,264,000',
                        text:'今日总销售额'
                    },
                    {
                        icon:'el-icon-s-release',
                        bgaColor:'backgroundColor:rgb(34,184,205)',
                        data:'14',
                        text:'今日售后数量'
                    },
                    {
                        icon:'el-icon-success',
                        bgaColor:'backgroundColor:rgb(255,188,125)',
                        data:'9025',
                        text:'本月已完成订单'
                    },
                    {
                        icon:'el-icon-s-goods',
                        bgaColor:'backgroundColor:rgb(255,188,125)',
                        data:'246,662,000',
                        text:'本月总销售额'
                    },
                    {
                        icon:'el-icon-s-release',
                        bgaColor:'backgroundColor:rgb(255,188,125)',
                        data:'268',
                        text:'本月售后数量'
                    },
                ]
            }
        }
    }
}